package edu.cuit.avatar;

public class CharacterDemo {
    public static void main(String[] args) {
        char letter = 'A';
        char numChar = '5';
        char ch = '龘';  //java中采用unicode字符编码

        System.out.println(ch);

        char ch2 = '\u00FF';

        System.out.println(ch2);

        System.out.println(letter + 1); //66
        System.out.println((char)66.66);

        System.out.println(letter++);

        String message = "鲁迅曾经说过:\"老子没有说过\"";
        System.out.println(message);

        System.out.println('A' == 'B'); //false
        System.out.println('A' > 'B'); // false

        /*
        char =====>   Character

         */
        //用户名首字母必须是大写字母
        System.out.println(Character.isUpperCase(letter)); //true
        System.out.println(Character.isLowerCase(letter)); //false
        System.out.println(Character.isLowerCase(letter)); //true
        System.out.println(Character.isDigit(numChar)); //true
        System.out.println(Character.isDigit(letter)); //false
        System.out.println(Character.isLetterOrDigit(letter)); //true
        System.out.println(Character.isLetterOrDigit(numChar)); //true
        System.out.println(Character.toUpperCase('a'));
        System.out.println(Character.toLowerCase('a'));
        //
        System.out.println(Character.digit('A', 16));
        System.out.println(Character.digit('1', 10));
    }
}
